diagonalisation of matrix